package com.web.selenium.element;

import org.openqa.selenium.WebElement;

import com.web.model.element.WebCheckBox;

public class SeleniumCheckBox implements WebCheckBox{

	private WebElement element;
	
	public SeleniumCheckBox(WebElement element){
		
		this.element = element;
	}

	public void check() {
		
		if(!isSelected()){
			element.click();
		}
	}

	public void uncheck() {

		if(isSelected()){
			element.click();
		}
	}

	public boolean isSelected() {
		return element.isSelected();
	}
	
}
